home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / picnic1.zip / PICNIX.DOC < prev   
Text File  |  1987-02-22  |  23KB  |  570 lines

  1.  
  2.  
  3. THE PiCnix Package (PC Version):
  4. --------------------------------
  5.  
  6.    This  document describes the PC Version of the PiCnix*  package  by 
  7. Peter  Stephen Heitman.    The utilities in the PiCnix package emulate 
  8. the functionality of UNIX* System V commands as completely as possible 
  9. for  MS-DOS*  and PC-DOS* users.  The utilities included in the PiCnix 
  10. package are: 
  11.  
  12.  
  13. Name:     cat - file listing utility
  14. Usage:    cat [-u] [-s] [ -v [-t] [-e] ] file1 ...
  15. Version:  2.0 for PCs with DOS 2.1 and higher
  16.  
  17. Name:     chlabel - set the volume label
  18. Usage:    chlabel \<volume label>\ [drive specifier]
  19. Version:  2.0 for PCs with DOS 2.1 and higher
  20.  
  21. Name:     chmod - update attribute bits of files
  22. Usage:    chmod <mode> file1 ...
  23. Version:  2.0 for PCs with DOS 2.1 and higher
  24.  
  25. Name:     cp - copy files
  26. Usage:    cp file1 file2
  27.           cp file1 ... fileN directory
  28. Version:  2.0 for PCs with DOS 2.1 and higher
  29.  
  30. Name:     cpdir - copy a directory
  31. Usage:    cpdir Dir1 Dir2
  32. Version:  2.0 for PCs with DOS 2.1 and higher
  33.  
  34. Name:     df - print disk free space information
  35. Usage:    df [ -a | { drive specifier }* ]
  36. Version:  2.0 for PCs with DOS 2.1 and higher
  37.  
  38. Name:     diff - find differences between two text files
  39. Usage:    diff [ -e ] [ -b ] [ -h ]  oldfile newfile
  40. Version:  2.0 for PCs with DOS 2.1 and higher
  41.  
  42. Name:     du - disk usage utility
  43. Usage:    du [ -a ] [ -r ] [ -s ] [ names ]
  44. Version:  2.0 for PCs with DOS 2.1 and higher
  45.  
  46. Name:     fgrep - fast text search through files
  47. Usage:    fgrep [ -vclxins? ] <pattern> file1 ...
  48. Version:  2.0 for PCs with DOS 2.1 and higher
  49.  
  50. Name:     grep - regular expression search through files
  51. Usage:    grep [ -vclins? ] <pattern> file1 ...
  52. Version:  2.0 for PCs with DOS 2.1 and higher
  53.  
  54. Name:     ls - directory listing utility
  55. Usage:    ls [ -cx1lmetsurpfaRd? ] [ names ]
  56. Version:  2.0 for PCs with DOS 2.1 and higher
  57.  
  58. Name:     more - file listing utility
  59. Usage:    more [ -cx1lmetsurpfaRd? ] [ file1 ... ]
  60. Version:  2.0 for PCs with DOS 2.1 and higher
  61.  
  62. Name:     mv - move files
  63. Usage:    mv [-f] file1 file2
  64.           mv [-f] file1 ... fileN directory
  65. Version:  2.0 for PCs with DOS 2.1 and higher
  66.  
  67. Name:     mvdir - move a directory
  68. Usage:    mvdir Dir1 Dir2
  69. Version:  2.0 for PCs with DOS 2.1 and higher
  70.  
  71. Name:     ncd - change to directory
  72. Usage:    ncd [ - | new-directory ]
  73. Version:  2.0 for PCs with DOS 2.1 and higher
  74.  
  75. Name:     ndate - set and display current date and time
  76. Usage:    ndate [ mmddhhmm[yy] ] [+<format string>]
  77. Version:  1.0 for PCs with DOS 2.1 and higher
  78.  
  79. Name:     necho - echo arguments
  80. Usage:    necho <argument list>
  81. Version:  2.0 for PCs with DOS 2.1 and higher
  82.  
  83. Name:     nset - set and display the command processor's environment
  84. Usage:    nset [ <name>=[<parameter>] ]
  85. Version:  1.0 for PCs with DOS 2.1 and higher
  86.  
  87. Name:     unset - delete a string from the command processor's environment
  88. Usage:    unset <name>
  89. Version:  1.0 for PCs with DOS 2.1 and higher
  90.  
  91. Name:     ntime - time a command
  92. Usage:    ntime <command string>
  93. Version:  1.0 for PCs with DOS 2.1 and higher
  94.  
  95. Name:     pwd - print the working directory
  96. Usage:    pwd [ -a | { drive specifier }* ]
  97. Version:  2.0 for PCs with DOS 2.1 and higher
  98.  
  99. Name:     rm - remove files
  100. Usage:    rm [ -i ] [ -f ] [ -r ] file ...
  101. Version:  2.0 for PCs with DOS 2.1 and higher
  102.  
  103. Name:     show - find a file along a path
  104. Usage:    show [ -a ] [ -p <environment variable> ] file1 ... 
  105. Version:  2.0 for PCs with DOS 2.1 and higher
  106.  
  107. Name:     strings - print ASCII strings embedded in binary files
  108. Usage:    strings [ -t <n>] [ -n <n>] [ file1 ... ]
  109. Version:  1.0 for PCs with DOS 2.1 and higher
  110.  
  111. Name:     switchar - set or display the current system switch character
  112. Usage:    switchar [ <new-switchar> | '<new-switchar>' | \<new switchar>\ ]
  113. Version:  2.0 for PCs with DOS 2.1 and higher
  114.  
  115. Name:     tee - create multiple outputs from the input
  116. Usage:    tee [ -a ] file ..."
  117. Version:  2.0 for PCs with DOS 2.1 and higher
  118.  
  119. Name:     touch - update last-write times of files
  120. Usage:    touch [ -c ] [ mmddhhmm[yy] ] file1 ...
  121. Version:  2.0 for PCs with DOS 2.1 and higher
  122.  
  123. Name:     wc - word counter
  124. Usage:    wc [ -l ] [ -w ] [ -c ] [ file1 ... ]
  125. Version:  2.0 for PCs with DOS 2.1 and higher
  126.  
  127.     The utilities are distributed in 6 archives to keep the size down 
  128. to less than 70 Kbytes apiece.  The archives are:
  129.  
  130.     PiCnix1.arc:  cat.exe chlabel.exe chmod.exe cp.exe cpdir.exe
  131.     PiCnix2.arc:  df.exe diff.exe du.exe
  132.     PiCnix3.arc:  fgrep.exe grep.exe ls.exe time.exe
  133.     PiCnix4.arc:  more.exe mv.exe mvdir.exe ncd.exe 
  134.     PiCnix5.arc:  ndate.exe necho.exe nset.exe unset.exe pwd.exe rm.exe
  135.     PiCnix6.arc:  show.exe strings.exe switchar.exe tee.exe touch.exe wc.exe
  136.  
  137.  
  138. * PiCnix is a trademark of Peter Stephen Heitman
  139. * UNIX is a trademark of  Bell  Laboratories.
  140. * MS-DOS  is a U.S.  registered trademark of Microsoft,  Incorporated.
  141. * PC-DOS is a  trademark  of  International Business Machines.  
  142.  
  143.  
  144.  
  145. CONDITIONS FOR USE AND DISTRIBUTION:
  146. -----------------------------------
  147.  
  148.     PiCnix  is  being  distributed under the user-distributed concept.  
  149. Please  pass this package on to others and upload it to your  favorite 
  150. computer  bulletin  board,  but please make sure you  give  them  the 
  151. complete  PiCnix package,  including this document.  You also may  not  
  152. misrepresent,   either  by commission or  omission,   the  conditions 
  153. under which this program is being distributed.  
  154.  
  155.     If  you  use any of  the utilities in this package  on  a  regular 
  156. basis,  it  is  requested that you register as a user  of  PiCnix  by 
  157. sending  a  donation of $15  to the author.  A  registration  form  is 
  158. provided  below  for  your convenience.   Your   donation   will  help 
  159. support  improvements  and additions  to the PiCnix  package.    Your 
  160. registration will entitle you to  receiving notices  when  updates are 
  161. available  and  will allow you to  order the updated versions  of  the 
  162. package for only $10  per update.   When you register,  please include 
  163. your name and address so that notices of updates may be sent to you. 
  164.  
  165.    If you are registered as a user of the PiCnix package,   the source 
  166. for  all  of  these  utilities,   including  the   sources   for   the  
  167. underlying   libraries,   is  available  for an additional fee.    The 
  168. source currently consists of over one megabyte  of  'C'  and  assembly 
  169. code   written  for  the  C-Ware  DeSmet  Compiler.   One  library  of 
  170. particular interest will be the code that provides  for  command  line 
  171. argument  expansion  that  is  consistent  with the argument expansion 
  172. provided by Unix.  The only restrictions on the  use  of  this  source 
  173. code  is  that  you may not create a competing product and a copyright 
  174. notice is required when using  some  of  the  included  libraries.  No 
  175. warranty  is  given  that  these  sources  will  be  suitable  for any 
  176. particular purpose.  
  177.  
  178.  
  179.     Of course,  anyone may send in bug reports and suggestions for how 
  180. the  package  may  be improved.   Please try to describe  the  bug  as 
  181. completely and accurately as possible along with a description of  how 
  182. it may be reproduced consistently (if you know).  I am very interested 
  183. in making the PiCnix package completely bug free, so please help me by 
  184. reporting any bugs you encounter.  Suggestions for how the package may 
  185. be  improved are always welcome,  particularly suggestions about which 
  186. System V commands to implement next. 
  187.  
  188.  
  189.                                             Date: ____________________
  190.  
  191.  
  192.  
  193.  
  194.  
  195. PiCnix Package 
  196. Peter Stephen Heitman
  197. P.O. Box 658
  198. Hadley, MA  01035
  199.  
  200.  
  201.  
  202.  
  203. Version of the PiCnix package:               PC Version
  204.  
  205. Release Date of this package:                January 1, 1987
  206.  
  207.  
  208.  
  209.  
  210.  
  211.             Registration Fee:                 ($15.00)   _________
  212.  
  213.             Ordering the most recent update:  ($10.00)   _________
  214.  
  215.             Ordering the sources:             ($30.00)   _________
  216.  
  217.                                                Total:    _________
  218.  
  219.  
  220. NOTE:  You must be currently registered as a user or 
  221.        must include your $15.00 registration fee with
  222.        your order to be able to order an update or the
  223.        sources.
  224.  
  225.  
  226.  
  227.     Select ONE:     360K Floppies  ______      1.2M Floppies  ______
  228.  
  229.  
  230.  
  231.  
  232.     YOUR NAME:      ________________________________________________
  233.  
  234.     YOUR ADDRESS:   ________________________________________________
  235.  
  236.                     ________________________________________________
  237.  
  238.                                                         ____________
  239.  
  240.  
  241. IMPORTANT THINGS TO KNOW BEFORE USING PiCnix:
  242. ---------------------------------------------
  243.  
  244.  
  245.     All  the  utilities  in  the PiCnix package share a common command 
  246. line format,  in general the command line for each will look like  the 
  247. following.  
  248.  
  249.          COMMAND   argument1 .... argumentN
  250.  
  251.     The  possible  arguments  are  described more fully in the following 
  252. sections.  
  253.  
  254.  
  255. Arguments:
  256.  
  257.  
  258.     Options: 
  259.  
  260.          The Options are also referred to as switches and are used  to 
  261.          modify  the  action or purpose of a COMMAND.  All the options 
  262.          for a COMMAND are grouped before the first filespec.  Options 
  263.          are distinguished from filespecs by the very first  character 
  264.          called  a  switch  character.  The  switch  character is user 
  265.          definable but will be a '/' whenever the  computer  is  first 
  266.          turned on.  
  267.  
  268.  
  269.          I have supplied a utility called SWITCHAR that will allow you 
  270.          to  show  what  the current system switch character is and to 
  271.          set the system switch character to a new value.  You may want 
  272.          to change the system switch character to a minus sign '-'  to 
  273.          be  consistent  with the switch character assumed by Unix and 
  274.          to get filenames  printed  out  in  lower  case.  The  switch 
  275.          character  that  you  select will determine other things.  If 
  276.          you use the default switch character of  '/',  the  following 
  277.          will be used: 
  278.  
  279.             On  input,  the single-escape will be a pound sign '#'.  
  280.             On output,  the directory separator will be  a  back-slash 
  281.             '\'.  and filenames will be printed in UPPER CASE.  
  282.            
  283.           If you use a switch character different than the default '/',  the 
  284.           following will be used:
  285.  
  286.             On  input,  the  single-escape will be a back-slash '\'.  
  287.             On output,  the directory separator will be a  slash  '/'.  
  288.             and filenames will be printed in lower case.  
  289.  
  290.           The single-escape character is explained below.  
  291.  
  292.  
  293.    switch character: 
  294.  
  295.          If the switch character is at the beginning of  an  argument, 
  296.          that argument is assumed to be an option.  
  297.  
  298.  
  299.  
  300.     single-escape: 
  301.  
  302.          The single-escape causes the next character to not be treated 
  303.          specially.  For example,  a space or a tab normally separates 
  304.          one argument from another.  By using the single-escape, it is 
  305.          possible  to  make  one  argument  out  of two words.  If the 
  306.          single escape is a back  slash  '\',  the  following  is  one 
  307.          argument: 
  308.  
  309.                    one\ argument
  310.  
  311.          The  utility  would  see the argument as being a string of 12 
  312.          characters "one  argument",  including  the  space.  This  is 
  313.          particularly  useful for the utilities fgrep and grep,  which 
  314.          search for a string in a list of  files.  The  single  escape 
  315.          also  causes  the  special characters single quote ',  double 
  316.          quote '"', dollar sign '$', star '*', question mark '?', left 
  317.          bracket '[' and  single-escape  to  not  be  special  if  the 
  318.          single-escape appears immediately before the special character.  
  319.  
  320.          NOTE:  The  single escape is removed from the argument unless 
  321.                 the argument is enclosed in single  quotes.  In  order 
  322.                 to  get  a  single-escape in the argument,  use two of 
  323.                 them.  The first single-escape causes the  second  one 
  324.                 to not be treated specially.  
  325.  
  326.  
  327.  
  328.     dollar sign '$': 
  329.  
  330.          The  dollar  sign  signals  the  beginning  of an environment 
  331.          variable.  The characters beginning right  after  the  dollar 
  332.          sign  and  continuing until the first character that is not a 
  333.          digit or a letter is assumed to be an  environment  variable.  
  334.          If  that  sequence  of characters IS an environment variable, 
  335.          the value of the environment  variable  is  inserted  in  its 
  336.          place  on  the  command  line.  For example,  assume that the 
  337.          command line argument is:  $lib/myfile.  If at the DOS prompt 
  338.          you had previously entered the command: 
  339.  
  340.               SET LIB=/source 
  341.          
  342.  
  343.          $lib/myfile would be interpreted as /source/myfile.  If  $lib 
  344.          was  not  defined (did not exist in the current environment), 
  345.          the utility would see that  argument  as  /myfile.  The  $lib 
  346.          would be ignored completely.  
  347.  
  348.          Environment variables are defined using the DOS command  SET, 
  349.          or the PiCnix command  NSET,  and are active until deleted or 
  350.          the system is re-started.  Please see the section in your DOS
  351.          manual about the SET command for additional information.  
  352.  
  353.          Many of the utilities in the PiCnix package  use  environment 
  354.          variables to set or change default options.  
  355.  
  356.  
  357.     single quote ': 
  358.  
  359.          The single quote is used to make one argument out of a string 
  360.          of words.  For example: 
  361.  
  362.                    'this is one argument' 
  363.  
  364.          NOTE:  Everything  inside of a single quoted string is passed 
  365.                 to the application as is.  No expansion of environment 
  366.                 variables or wildcard characters are done.  
  367.  
  368.  
  369.     double quote '"': 
  370.  
  371.          The double quote is like the single  quote  except  that  the 
  372.          single-escape  and  the  dollar  sign  (described  below) ARE 
  373.          expanded.  
  374.  
  375.  
  376.     accent grave '`': 
  377.  
  378.          The accent  grave is used to mark the beginning and end of  a 
  379.          command  string whose output should be substituted as all  or 
  380.          part of the argument.  For example, the command: 
  381.  
  382.          nset pwd = `pwd`
  383.  
  384.          causes the environment variable PWD to be set to the value of 
  385.          the current working directory.   This is useful if later  you 
  386.          want to return to that same directory.  This can be done with 
  387.          the command: 
  388.  
  389.          ncd $pwd
  390.  
  391.          Note that embedded and trailing newlines in the output of the 
  392.          embedded command are converted to spaces. 
  393.  
  394.  
  395.     Filespecs: 
  396.  
  397.          File specifiers are made from 3 parts, 
  398.  
  399.               Wildcard characters * ?  
  400.  
  401.               Environment variables $variable 
  402.  
  403.               Character classes [abf...] 
  404.  
  405.          For example: 
  406.  
  407.               necho  $user\* 
  408.                    uses  the  value of the environment variable "user" 
  409.                    as the path 
  410.  
  411.               necho *a*
  412.                    operates on file names that contain at least 1 'a'.  
  413.  
  414.               necho *.[qrzg]
  415.                    expands to  match  any  file  with  a  1  character 
  416.                    extension that is either q,r,z or g 
  417.  
  418.               necho  test?.*
  419.                    will match all file names that have 5 characters in 
  420.                    the  name  before  the  extension  and  the first 4 
  421.                    characters are "test" 
  422.  
  423.          These  characters  enable  you  to  specify patterns that can 
  424.          match 0, 1,  or many filenames.  If more than one filename is 
  425.          matched,  all  of the filenames that matched become arguments 
  426.          to the utility.  For example,  since a star '*' all by itself 
  427.          matches all filenames in the current directory, the command 
  428.  
  429.          more *  is the same as     more <file1> <file2> <file3> ...  
  430.  
  431.  
  432.          Let's assume that the following  files  are  in  the  current 
  433.          directory: 
  434.  
  435.               C1.A    C1.B    B1.A    B1.B    MYFILE    BLAH 
  436.  
  437.          star '*': 
  438.  
  439.               The star '*' matches 0 or more characters in a filename, 
  440.               including the dot '.'.  The argument * would be expanded 
  441.               into all of the filenames in the current directory.  The 
  442.               argument B* would expand into 3 filenames, B1.A B1.B and 
  443.               BLAH.  The  argument *1.A would expand into 2 filenames, 
  444.               C1.A and B1.A.  The argument C*1.A would expand into one
  445.               filename, C1.A.  
  446.  
  447.  
  448.          question mark '?': 
  449.  
  450.               The  question  mark  '?'  matches  any  one   character, 
  451.               including  the dot '.'.  For example,  the argument C1.? 
  452.               would expand into the filenames C1.A and C1.B.  However, 
  453.               the argument C1?.A would not match any of the  filenames 
  454.               in the current directory and so would not be expanded.  
  455.  
  456.  
  457.          left and right brackets '[' and ']': 
  458.  
  459.               The  left  and  right  brackets [] are used to construct 
  460.               character  classes.   Character  classes   are   matched 
  461.               against any ONE (1) character, in the same manner as the 
  462.               question  mark  '?'.  The  left  bracket  '[' begins the 
  463.               character class and  the  right  bracket  ']'  ends  the 
  464.               character  class.  A  character class contains a list of 
  465.               the characters that are allowed to match.  For  example, 
  466.               the  argument  C1.[ABC]  contains a character class that 
  467.               has three characters,  A,  B and C.  This argument would 
  468.               be  expanded  into  two  filenames,   C1.A  and  C1.B  .  
  469.  
  470.               Character classes can also contain ranges of characters.  
  471.               For example,  the pattern C1.[ABC] is equivalent to  the 
  472.               pattern C1.[A-C].  Finally,  if the first character in a 
  473.               character  class  is  an  exclamation  point  '!',   the 
  474.               character  class  matches  any  character  that  is  NOT 
  475.               specified  between  the  brackets.  Thus,  the  argument 
  476.               [!B]1.A would expand into the filename C1.A.  
  477.  
  478.          NOTE:  as a special case, patterns that end in a dot '.' will 
  479.                 not match any  filenames  that  have  extensions.  For 
  480.                 example,  the  pattern *.  will match all filenames in 
  481.                 the current directory that do not have an extension.  
  482.                 
  483.  
  484.     Getting help for each utility: 
  485.  
  486.          Each utility in the  PiCnix  package  will  display  a  brief 
  487.          summary  of  what  it  does and what each of the command line 
  488.          options are if you  execute  it  with  the  argument  <switch 
  489.          character>?.  For  example,  if  your switch character is the 
  490.          default '/', you can find out what the utility 'more' does by 
  491.          executing the following line at the DOS prompt: 
  492.  
  493.               more /?  
  494.  
  495.          NOTE:  In  the  description  for  each utility,  command line 
  496.                 options are shown with the switch  character  being  a 
  497.                 minus  sign  '-'.  You  need  to substitute the switch 
  498.                 character you are using if it is not the minus sign.  
  499.  
  500.  
  501.  
  502. History Log for PiCnix releases:
  503.  
  504. First Dated Release:  January 1, 1987
  505.  
  506.     Included in first dated release:
  507.  
  508.     cat.exe chlabel.exe chmod.exe cp.exe cpdir.exe
  509.     df.exe diff.exe du.exe
  510.     fgrep.exe grep.exe ls.exe
  511.     more.exe mv.exe mvdir.exe ncd.exe 
  512.     ndate.exe necho.exe nset.exe unset.exe pwd.exe rm.exe
  513.     show.exe strings.exe switchar.exe tee.exe touch.exe wc.exe
  514.  
  515.     New in this release:
  516.  
  517.     ndate.exe nset.exe unset.exe ntime.exe strings.exe
  518.  
  519.     Modified in this release:
  520.  
  521.     All of the utilities have had the following changed:
  522.                 1) The accent grave processing in the command line has
  523.                    been added.  The single escape character has been
  524.                    changed to a pound sign '#' when the switch character
  525.                    is the forward slash '/'.
  526.                 2) if a drive specifier is provided to a filespec, a slash
  527.                    character is inserted after the ':' if one is not
  528.                    already there.  For example, 
  529.                     cp a:this .
  530.                    will become a:/this before cp checks for the file.
  531.  
  532.     cp.exe, cpdir.exe, mv.exe, mvdir.exe:
  533.                 Modified the buffer size for copies to 32K from 8K.
  534.  
  535.     diff.exe  : fixed the case where a directory is given as one of the
  536.                 filenames.  Before, the entire pathname of the other
  537.                 argument was appended to the directory name.  Now, only
  538.                 the filename part of the other argument is appended to the 
  539.                 directory.
  540.  
  541.     fgrep.exe : fixed -i (ignore case) option.  Before fix, lines with
  542.                 matching pattern were printed in all lower case.  Now,
  543.                 lines with matching pattern are printed as they were
  544.                 read from the file.
  545.  
  546.     grep.exe  : added -i (ignore case) option.  Before, this option would
  547.                 report that it wasn't implemented.
  548.  
  549.     ls.exe    : fixed the -u (unsorted filenames) option.  Before, sorting
  550.                 of filenames was done at a very low level and it was not
  551.                 an option to not do the sorting.  Now the low level routines
  552.                 can be told not to do the sorting.
  553.  
  554.     ncd.exe   : changed the method by which the environment is modified.
  555.                 The old ncd would not work correctly in batch files.  It
  556.                 left a copy of itself around in memory.
  557.  
  558.     pwd.exe   : pwd no longer allows arguments other than -?.  pwd always
  559.                 shows the current working directory on the default drive
  560.                 only.
  561.  
  562.     rm.exe    : now correctly removes hidden and system files during the
  563.                 -r (recursive) option.
  564.  
  565.     show.exe  : fixed -p (search path) option.  Before fix, if the command
  566.                 line argument was -pPATH with no space between the -p and 
  567.                 the path, this would not be handled correctly.  Also, it
  568.                 is now allowed to specify the path in lower case, i.e.,
  569.                 -p path.
  570.